﻿package mortal.game.view.systemSetting.data
{

    public class SettingItem extends Object
    {
        private var _desStr:String;
        private var _key:String;
        private var _valueType:int = 0;
        private var _value:int = 0;
        private var _defaultValue:int = 0;
        private var _displayValue:int = 0;
        private var _extend:Object;
        public static const BOOLEAN:int = 0;
        public static const INT:int = 1;
        public static const SELECT:int = 2;

        public function SettingItem(param1:String, param2:String, param3:int = 0, param4:int = 0, param5:Object = null)
        {
            this._desStr = param1;
            this._key = param2;
            this._valueType = param4;
            this._defaultValue = param3;
            this._value = param3;
            this._displayValue = param3;
            this._extend = param5;
            return;
        }// end function

        public function get extend() : Object
        {
            return this._extend;
        }// end function

        public function get valueType() : int
        {
            return this._valueType;
        }// end function

        public function get key() : String
        {
            return this._key;
        }// end function

        public function get value() : int
        {
            return this._value;
        }// end function

        public function set value(param1:int) : void
        {
            this._value = param1;
            this._displayValue = param1;
            return;
        }// end function

        public function get bValue() : Boolean
        {
            return Boolean(this._value);
        }// end function

        public function get displayValue() : int
        {
            return this._displayValue;
        }// end function

        public function set displayValue(param1:int) : void
        {
            this._displayValue = param1;
            return;
        }// end function

        public function resetToDefault() : void
        {
            this._value = this._defaultValue;
            this._displayValue = this._defaultValue;
            return;
        }// end function

        public function updateToServer() : void
        {
            this._value = this._displayValue;
            return;
        }// end function

        public function recover() : void
        {
            this._displayValue = this._value;
            return;
        }// end function

        public function get desStr() : String
        {
            return this._desStr;
        }// end function

    }
}
